class AddPhotoParams < ActiveRecord::Migration
  def self.up
    STDERR.puts "Adding params to photos table"
    add_column :photos, :camera, :string
    add_column :photos, :lens,   :string
    rename_column :photos, :viewed, :views
    change_column :photos, :views, :integer, :null => true, :default => 0
  end

  def self.down
    STDERR.puts "Removing params from photos table"
    change_column :photos, :views, :integer
    rename_column :photos, :views, :viewed
    remove_column :photos, :lens
    remove_column :photos, :camera
  end
end
